package com.qlk.odcinterface.dao.impl;

import com.qlk.common.dao.mybatis.BaseDao;
import com.qlk.odcinterface.dao.PmsFullCutChannelDao;
import com.qlk.odcinterface.domain.PmsFullCutChannel;
import com.qlk.odcinterface.domain.query.PmsFullCutChannelQuery;

import java.util.List;
import org.springframework.stereotype.Repository;

/**
 * PmsFullCutChannelDAO实现类<br/>
 * 对'满减促销渠道对应表表'表进行基本的操作
 * 
 * @author zhaoyanan
 * @version 2016-4-14 13:22:58
 * 
 */
@Repository
public class PmsFullCutChannelDaoImpl extends BaseDao implements PmsFullCutChannelDao {
    /** namespace */
    private final String namespace = PmsFullCutChannelDaoImpl.class.getName();
    
    /**
     * {@inheritDoc}
     */
    public List<PmsFullCutChannel> queryPmsFullCutChannelList(PmsFullCutChannelQuery queryBean) {
        return (List<PmsFullCutChannel>) queryForList(namespace +".queryPmsFullCutChannelList", queryBean);
    }

    /**
     * {@inheritDoc}
     */
    public boolean insert(PmsFullCutChannel pmsFullCutChannel) {
        return insert(namespace +".insert", pmsFullCutChannel);
    }

    /**
     * {@inheritDoc}
     */
    public boolean update(PmsFullCutChannel pmsFullCutChannel) {
        return update(namespace +".update", pmsFullCutChannel);
    }

    /**
     * {@inheritDoc}
     */
    public int queryPmsFullCutChannelCount(PmsFullCutChannelQuery queryBean) {
        return (Integer) queryForObject(namespace +".queryPmsFullCutChannelCount", queryBean);
    }

    /**
     * {@inheritDoc}
     */
    public List<PmsFullCutChannel> queryPmsFullCutChannelListWithPage(PmsFullCutChannelQuery queryBean) {
        return (List<PmsFullCutChannel>) queryForList(namespace +".queryPmsFullCutChannelListWithPage", queryBean);
    }

    /**
     * {@inheritDoc}
     */
    public boolean delete(PmsFullCutChannel configuration) {
        return delete(namespace +".delete", configuration);
    }

    /**
     * {@inheritDoc}
     */
    public PmsFullCutChannel getPmsFullCutChannelById(Integer id) {
        return (PmsFullCutChannel) queryForObject(namespace +".getPmsFullCutChannelById", id);
    } 
    
    /**
     * {@inheritDoc}
     */
    public boolean exist(PmsFullCutChannel pmsFullCutChannel) {
        int count = (Integer) queryForObject(namespace +".exist", pmsFullCutChannel);
        return count > 0;
    }
}
